package com.yf1706.converter;

import java.sql.Date;

import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

@Component
public class StringToDate implements Converter<String, Date> {

	@Override
	public Date convert(String source) {
		try {
			return Date.valueOf(source);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
